
********************************************************************************
*************************** Appendix 5: Figure 5E ******************************
********************************************************************************

***use "ANESGSS2020_Coded.dta" , clear

///Note that I edited these graphics manually, but this code will produce the 
///correct estimates plotted in Appendix Figure 5E. 

svyset[pweight=weight]
svy: regress covidconcern c.auth_scale##i.know_high age male black hispanic education income unemp south
margins, dydx(auth_scale) at (know_high=(0 1))
marginsplot

svy: regress dv_leftright c.auth_scale##i.know_high age male black hispanic education income unemp south
margins, dydx(auth_scale) at (know_high=(0 1))
marginsplot


********************************************************************************
********************************* Appendix 6 ***********************************
********************************************************************************

***use "ANESGSS2020_Coded.dta" , clear
svyset[pweight=weight]

* Concern over COVID-19 (2020)
svy: regress covidconcern c.auth_scale##c.engagement age male black hispanic education income unemp south
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Concern over COVID-19 (2020)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))


***use "Lucid2020_Coded.dta", clear

* Health Behaviors (2020)
regress behavior_scale c.auth_scale##c.engagement age01 male black hispanic educ01 income01 unemp south
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Health Behaviors (2020)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))
	
* Public Health Measures (2020)
regress publichealth_scale c.auth_scale##c.engagement age01 male black hispanic educ01 income01 unemp south
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Public Health Measures (2020)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))
	
* Economic Policies (2020)
regress econ_scale c.auth_scale##c.engagement age01 male black hispanic educ01 income01 unemp south
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Economic Interventions (2020)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))		


***use "Lucid2021_Coded.dta", clear
	
* Health Behaviors (2021)
regress behavior_scale c.auth_scale##c.engagement age01 i.male i.black i.hispanic educ01 income01 i.unemp i.south i.covid_posandsus
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Health Behaviors (2021)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))
	
* Vaccination (2021)
logit dv_vaccinated c.auth_scale##c.engagement age01 i.male i.black i.hispanic educ01 income01 i.unemp i.south i.covid_posandsus
margins, at (engagement=(0(.25)1) auth_scale=(0 1) black=0 hispanic=0 unemp=0 south=0 covid_posandsus=0)
marginsplot, ///
	title("     Vaccination (2021)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))
	
* Public Health Measures (2021)
regress publichealth_scale c.auth_scale##c.engagement age01 male black hispanic educ01 income01 unemp south covid_posandsus
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Public Health Measures (2021)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))
	
* Economic Policies (2021)
regress econ_scale c.auth_scale##c.engagement age01 male black hispanic educ01 income01 unemp south covid_posandsus
margins, at (engagement=(0(.25)1) auth_scale=(0 1))
marginsplot, ///
	title("     Economic Interventions (2021)", color(black) size(18pt)) ///
    xtitle("Engagement", size(14pt)) ///
	ytitle("Predicted Value", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(.3(.1)1, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Authoritarianism=0" 2 "Authoritarianism=1") size(14pt)) ///
    l(90) ///
	yline(.3 .4 .5 .6 .7 .8 .9 1, lcolor(gs15))		
	
	
********************************************************************************
********************************* Appendix 7 ***********************************
********************************************************************************

***use "Lucid2020_Coded.dta", clear

* Economic Policies (2020)
regress econ_scale c.auth_scale##c.income01##c.engagement age01 male black hispanic educ01 south
margins, dydx(auth_scale) at (income01=(0 1) engagement=(0 1))
marginsplot, ///
	title("           2020", color(black) size(18pt)) ///
    xtitle("Income", size(14pt)) ///
	ytitle("Effect of Authoritarianism", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(-.6(.2).6, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Disengaged" 2 "Engaged") size(14pt)) ///
    l(90) ///
	yline(-.6(.2).6, lcolor(gs15))
	
***use "Lucid2021_Coded.dta", clear

* Economic Policies (2021)
regress econ_scale c.auth_scale##c.income01##c.engagement age01 male black hispanic educ01 south
margins, dydx(auth_scale) at (income01=(0 1) engagement=(0 1))
marginsplot, ///
	title("           2021", color(black) size(18pt)) ///
    xtitle("Income", size(14pt)) ///
	ytitle("Effect of Authoritarianism", size(14pt)) ///
    yscale(titlegap(0)) ///
    ylabel(-.6(.2).6, nogrid angle(0)) ///
    xscale(titlegap(0)) ///
    xlabel(0 "0" .25 ".25" .5".5" .75 ".75" 1 "1") ///
    graphregion( color(white) ) ///
    plot1op(lcolor(black) lwidth(medium) mcolor(black) lpattern(solid)) ///
    recast(line) recastci(rarea) ci(color(gs14)) ///
    legend(cols(2) order(1 "Disengaged" 2 "Engaged") size(14pt)) ///
    l(90) ///
	yline(-.6(.2).6, lcolor(gs15))

		
 
 
 
 
 
 
 